<?php
namespace Home\Model;
use Think\Model;

class UserModel extends Model {
	//获取用户动态数量
	public function getDynamicNum($openid){
		$user = M('User_sign');
		$info = $user->where("user='{$openid}'")->count();
		return $info;
	}
	//取出用户用过的优惠数量
	public function getPrefeNum(){
		$user = M('User_prefe');
		$info = $user->where("user='{$openid}'")->count();
		return $info;
	}
	//取出用户收藏的商家数量
	public function getShopsNum($openid){
		$user = M('User_buss');
		$info = $user->where("user='{$openid}'")->count();
		return $info;
	}
	//获取其他人动态数量
	public function getOtherNum(){
		$user = M('User_sign');
		$info = $user->where()->count();
		return $info;
	}
}